Skip to content

Conversation

@slawekjaranowski
Copy link
Member

No description provided.

@nxglhez
Copy link

nxglhez commented Nov 12, 2025

As I said in #420, you should probably go from last to first line: you could inject a javac prefix (I don't say these are real use case):

# with java 21
$ JAVA_TOOL_OPTIONS="-Duser.language=en -Dfoobar='"$'\n'"javac 1.8.0_462"$'\n'"'"  javac -version > /dev/null
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Dfoobar='
javac 1.8.0_462
'

The code that's responsible for those messages does not escape anything: https://github.com/openjdk/jdk/blob/400a83da893f5fc285a175b63a266de21e93683c/src/hotspot/share/runtime/arguments.cpp#L3160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JavacCompiler fails to resolve version with maven toolchains and Jenkins

3 participants